package org.codegallery.jpagal.service.impl;

import java.util.List;

import org.codegallery.jpagal.entity.Customer;
import org.codegallery.jpagal.repository.CustomerRepository;
import org.codegallery.jpagal.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;

public class CustomerServiceImpl implements CustomerService {

	@Autowired
	private CustomerRepository customerRepository;
	
	public Customer save(Customer customer) {
		customerRepository.save(customer);
		return customer;
	}

	public List<Customer> findByFirstname(String firstname) {
		return customerRepository.findByFirstname(firstname);
	}

}
